//
//  UIColor+Extensions.h
//  LCFN-Buyers
//
//  Created by lcfn on 2018/3/30.
//  Copyright © 2018年 royce. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIColor (Extensions)

/**
 设置颜色值

 @param hexString 入参
 @return 出参
 */
+ (UIColor *) colorFromHexCode:(NSString *)hexString;

/**
 设置主视图透明子视图不透明

 @param aplan 主视图透明度
 @return 出参
 */
+ (UIColor *)setMainViewAplan:(CGFloat)aplan;

/**
 绘制渐变色颜色的方法 (纵向渐变)

 @param view 绘制颜色view
 @param fromHexColorStr 起始颜色值
 @param toHexColorStr 结束颜色值
 @return 返回值
 */
+ (CAGradientLayer *)setGradualChangingColor:(UIView *)view fromColor:(NSString *)fromHexColorStr toColor:(NSString *)toHexColorStr;

/**
 绘制渐变色颜色的方法 (横向渐变)
 
 @param view 绘制颜色view
 @param fromHexColorStr 起始颜色值
 @param toHexColorStr 结束颜色值
 @return 返回值
 */
+ (CAGradientLayer *)setGradualChangingColorH:(UIView *)view fromColor:(NSString *)fromHexColorStr toColor:(NSString *)toHexColorStr;
@end
